$OpenBSD: patch-src_corelib_io_qfsfileengine_unix_cpp,v 1.16 2012/06/14 09:38:35 espie Exp $
--- src/corelib/io/qfsfileengine_unix.cpp.orig	Thu Apr 26 21:46:08 2012
+++ src/corelib/io/qfsfileengine_unix.cpp	Sun Jun 10 13:25:08 2012
@@ -489,7 +489,7 @@ qint64 QFSFileEnginePrivate::nativeRead(char *data, qi
                     int readByte = 0;
                     do {
                         readByte = fgetc(fh);
-                    } while (readByte == -1 && errno == EINTR);
+                    } while (readByte == EOF && !feof(fh) && errno == EINTR);
                     if (readByte != -1) {
                         *data = uchar(readByte);
                         readBytes += 1;
